#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>
int main()
{
    char a[1000] = { 0 };
    int b[260] = { 0 };
    gets(a);
    int n = strlen(a);
    int i = 0, j = 0, max = 0, index = 0;
    for (i = 0; i < n; i++)
    {
        if (a[i] >= 1 && a[i] <= 255)
        {
            b[a[i] - 1]++;
        }
        i++;
    }
    for (i = 0; i < 255; i++)
    {
        if (b[i] > max)
        {
            max = b[i];
            index = i;
        }
    }
    printf("%c", index + 1);

    return 0;
}